<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="app">
        Vue模板
        <h1>{{ msg }}</h1>
        <h1>{{ msg.toUpperCase() }}</h1>
        <h2>{{ count + 1 }}</h2>
        <h2>{{username.charAt(1)}}</h2>
        <h2>{{price > 1000 ? '买不起' : '剁手'}}</h2>
        <h2>{{person}}</h2>
        <h2>{{person.age}}</h2>
    </div>
    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>

    <script>
        const app = new Vue({
            el: '#app',
            data: {
                msg: 'Hello Vue',
                count: 999,
                username: 'song',
                price: 1999,
                person:{
                    name:'胤霆',
                    age: 21
                }
            }
        })
        
    </script>
</body>

</html>